import Vue from 'vue'
import Vuex from 'vuex'
// import {post} from "../api"
Vue.use(Vuex)
const user={
  namespaced: true,
  actions:{
    setInfo({commit},value){
      commit("setInfo",value)
      
    }
  },
  mutations:{
    setInfo(state,value){
      state.userInfo = value
    },
    imgUrl(state,value){
      state.imgUrl = value
    },
    getCategory(state,value){
      state.classes = value
    }
  },
  state:{
    userInfo:{},
    imgUrl:"",
    pageNow:"首页",
    classes:[],
    checkClasses: [],
  },
  getters:{}
}
const topics ={
  namespaced:true,
  actions:{

  },
  mutations:{

  },
  state:{
    
  },
  getters:{

  }
}
export default new Vuex.Store({

  modules: {
    user,topics
  }
})
